﻿<Page
    x:Class="Navegar.UAP.Exemple.CRM.Views.CommandePage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Navegar.UAP.Exemple.CRM.Views"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:format="using:WinRTConverters.Format"
    xmlns:visibility="using:WinRTConverters.Visibility"
    mc:Ignorable="d"
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
    <Page.Resources>
        <format:StringFormatConverter x:Key="StringFormatConverter"/>
        <visibility:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
    </Page.Resources>
    <Page.DataContext>
        <Binding Path="CommandePagePageViewModelInstance" Source="{StaticResource Locator}"/>
    </Page.DataContext>
    <Page.BottomAppBar>
        <CommandBar>
            <AppBarButton
        		HorizontalAlignment="Left"
        		VerticalAlignment="Top"
        		Command="{Binding SaveCommand}"
        		Icon="Save"
        		Label="Enregistrer" FontFamily="Global User Interface">
            </AppBarButton>
            <AppBarButton
        		HorizontalAlignment="Left"
        		VerticalAlignment="Top"
        		Command="{Binding CancelCommand}"
        		Icon="Cancel"
        		Label="Fermer" FontFamily="Global User Interface" Visibility="{Binding IsWindowsApp, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        </CommandBar>
    </Page.BottomAppBar>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="120"/>
            <RowDefinition Height="1"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <TextBlock Grid.Row="0" Margin="40,40.8,0,40.2" TextWrapping="Wrap" Text="Commande" VerticalAlignment="Center" FontSize="32" HorizontalAlignment="Left"/>
        <Line Grid.Row="1" Stroke="White" X2="1" Margin="40,0" Stretch="Fill"/>
        <Grid Margin="40" Grid.Row="2">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>

            <StackPanel Grid.Row="0" Grid.Column="0" Orientation="Vertical">
                <TextBox FontFamily="Global User Interface" Text="{Binding CommandeCurrent.NumeroClient, Mode=TwoWay}" />
                <TextBlock Text="Numéro Client" Style="{StaticResource LabelTextBox}" />
            </StackPanel>

            <StackPanel Grid.Row="1" Grid.Column="0" Orientation="Vertical" Margin="0,40,0,0">
                <TextBox Text="{Binding CommandeCurrent.NumeroCommande, Mode=TwoWay}" />
                <TextBlock Text="Numéro Commande" Style="{StaticResource LabelTextBox}" />
            </StackPanel>

            <StackPanel Grid.Row="2" Grid.Column="0" Orientation="Vertical" Margin="0,40,0,0">
                <TextBox Text="{Binding CommandeCurrent.TotalCommande, Mode=TwoWay}" />
                <TextBlock Text="Total Commande" Style="{StaticResource LabelTextBox}"/>
            </StackPanel>
        </Grid>
    </Grid>
</Page>
